<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>translate3d 两面反转的盒子</title>
  <style>
    body {
      perspective: 200px;
    }

    .container {
      position: relative;
      height: 50px;
      width: 50px;
      margin: 0 auto;
      text-align: center;
      line-height: 200px;
      border: 1px solid red;
      transform-style: preserve-3d;
    }

    .container:hover {
      transform: rotate3d(1, 0, 0, 80deg);
      transition: all 3s;
    }

    .k_outer,
    .k_base,
    .k_bottom {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%,-50%);
      border-radius: 50%;
    }

    .k_outer {
      width: 20px;
      height: 20px;
      border: 2px solid green;
    }

    .k_base {
      width: 36px;
      height: 36px;
      border: 2px solid teal;
    }

    .k_bottom {
      width: 50px;
      height: 50px;
      border: 2px solid red;
    }
    .k_outer:hover{
      transform: translateY(-1px);
    }
  </style>
</head>

<body>
  <div class="container">
    <div class="k_bottom"></div>
    <div class="k_base"></div>
    <div class="k_outer"></div>
  </div>
</body>
<div></div>

</html>